package com.zy.cat.entity.wy;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;

@lombok.Data
@RequiredArgsConstructor
@ApiModel("9趣猫淘宝天猫店铺优惠券实体类")
public class CatShopCouponInfo {
	@ApiModelProperty(value="错误码(0.正常，其他错误)",example="0")
	private int error;
	
	@ApiModelProperty(value="店铺优惠券查询成功/失败",example="")
	private String msg;
	
	@ApiModelProperty(value="优惠券总数",example="1")
    private int couponsTotal;
	
	@ApiModelProperty(value="店铺优惠券详细信息",example="1")
    private Data data;

	public CatShopCouponInfo(int error, String msg) {
		super();
		this.error = error;
		this.msg = msg;
	}
	
	@lombok.Data
	@RequiredArgsConstructor
	@ApiModel("淘宝天猫店铺优惠券详细信息")
	public static class Data {	
		@Id
		@ApiModelProperty(value = "劵ID")
		private String uuid;
		
		@ApiModelProperty(value = "说明")
		private String subtitles;
		
		@ApiModelProperty(value = "券面额")
		private String title;
		
		@ApiModelProperty(value = "淘宝天猫店铺优惠券列表")
		@Transient
		private List<ShopCoupon> couponList;
		
		@ApiModelProperty(value = "风格")
		private String styles;

		@ApiModelProperty(value = "模板ID")
		private String templateId;

		@ApiModelProperty(value = "券面额左边标识")
		 private String titleLeftText;
	}

	@lombok.Data
	@RequiredArgsConstructor
	@ApiModel("淘宝天猫店铺优惠券列表")
	public static class ShopCoupon {
		
		@ApiModelProperty(value = "申请文本(立即领取)")
		private String applyText="立即领取";
		
		@ApiModelProperty(value = "优惠券显示名称")
		private String couponDisplayName="店铺优惠券";

		@ApiModelProperty(value = "显示类型")
		private String displayType;

		@ApiModelProperty(value = "是否启用(true/false)")
		private boolean enabled;

		@ApiModelProperty(value = "是否领取(true/false)")
		private boolean hasReceived;

		@ApiModelProperty(value = "是否是无限的(true/false)")
		private boolean infinite;
  }
}
